Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

229
Visualizações
I want to ignore "\" in the dynamic value

When i am launching the web application it is generating a state token which is dynamic value looks like this"State_token_g0=stateToken = '00aF\x2D5HSbtfsCjJbYUAayevCC5uvH9Qg5aMGSUvKEM';" and it is getting failed and throwing an error as"{"errorCode":"E0000003","errorSummary":"The request body was not well-formed.","errorLink":"E0000003","errorId":"oaewNC2ocVjS6m_EpiszsjV7Q","errorCauses":[]}". If the dynamic value generated without "" it is getting executed. it is not possible to delete \ from the library as well. Tried multiple regex ^[a-zA-Z0-9]+$, [^"]+?, \d+?,\w+?, {"stateToken":([^"]+?),^[A-Z0-9a-z\~!@#$%^&()_+|,./<>?]+$,[A-Z0-9a-z\], ^[A-Z0-9a-z\]+$

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

replace(/\\/g, ''); 

will replace backslashes, could you add this to your regex?

let string = "00aF\x2D5HSbtfsCjJbYUAayevCC5uvH9Qg5aMGSUvKEM";
var minusbackslash = string.replace(/\\/g, '');

//show result in result div
document.getElementById("result").innerText = minusbackslash;
<div id="result"></div>

about 4 years ago · Juan Pablo Isaza Relatório

0

You can remove backslashes by adding a JSR223 PostProcessor after your Regular Expression Extractor and using the following code in the "Script" area:

vars.put('State_token_g0', vars.get('State_token_g0').replaceAll('\\\\',''))

The line will replace the original value of the State_token_g0 JMeter Variable with the removed slashes.

Demo:

enter image description here

In the above example vars stands for JMeterVariables class instance, see the JavaDoc for full description of all functions and fields and Top 8 JMeter Java Classes You Should Be Using with Groovy article for more details on this and other JMeter API shorthands available for the JSR223 Test Elements

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda